#include <stdio.h>
#include <stdlib.h>
#include <sqlite3.h>

void test_db(void)
{
   sqlite3 *db;
   //char *zErrMsg;
   int rc;

   rc = sqlite3_open("mydb.db", &db);
    printf("链接数据库...\n");
   if( rc ){
      //fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
      printf("fail..\n");
      exit(0);
   }else{
      fprintf(stderr, "Opened database successfully\n");
   }
   sqlite3_close(db);
}

